From 1876823ef0f1c25e7308b564ecd72da995006d92 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 21 Mar 2011 10:53:12 -0400 Subject: [PATCH] themingengine: don't hardcode white to draw insensitive labels shadow Use the background color instead. I think the optimal solution would be delegating the shadow rendering to the theme completely, and removing this in GtkThemingEngine, but for now, this simple fix makes the dark variant more usable. https://bugzilla.gnome.org/show_bug.cgi?id=645405 --- gtk/gtkthemingengine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index df09426abe..6f5994d83e 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -2402,8 +2402,14 @@ gtk_theming_engine_render_layout (GtkThemingEngine *engine, if (flags & GTK_STATE_FLAG_INSENSITIVE) { + GdkRGBA bg; + + gtk_theming_engine_get_background_color (engine, flags, &bg); + cairo_save (cr); - cairo_set_source_rgb (cr, 1, 1, 1); + + gdk_cairo_set_source_rgba (cr, &bg); + cairo_move_to (cr, x + 1, y + 1); _gtk_pango_fill_layout (cr, layout); cairo_restore (cr); -- 2.30.2